package thread;

public class ThreadExTest {
	public static void main(String[] args) {
//		test1();
//		test2();
		test3();
	}

	private static void test3() {
		Thread t1 = new ThreadEx1();
		Thread t2 = new ThreadEx1();
//		Thread t3 = new ThreadEx();
		t1.start();
		t2.start();
//		t3.start();
	}

	private static void test2() {
		Thread t1 = new ThreadEx();
		Thread t2 = new ThreadEx();
		Thread t3 = new ThreadEx();
		t1.setPriority(10);
		t1.start();
		t2.start();
		t3.start();
		try {
			Thread.sleep(10000);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private static void test1() {
		Thread t1 = new ThreadEx();
		Thread t2 = new ThreadEx();
		Thread t3 = new ThreadEx();
		t1.start();
		t2.start();
		t3.start();
		try {
			Thread.sleep(10000);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
